Resizes the preview layer to this view's bounds (port of V5's AutoLayerResizingView.swift).
AutoLayerResizingView.swift